package com.ark.service.mapper;

import com.ark.common.domain.entity.sys.SysMenu;
import com.github.yulichang.base.MPJBaseMapper;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface SysMenuMapper extends MPJBaseMapper<SysMenu> {
    /**
     * 根据用户ID查询菜单
     * @param userId 用户ID
     */
    List<SysMenu> selectMenuTreeByUserId(Long userId);

    /**
     * 通过角色ID查询权限
     * @param roleId 角色ID
     */
    List<String> selectMenuPermsByRoleId(Long roleId);

    /**
     * 通过用户id查询菜单权限
     * @param userId 用户id
     */
    List<String> selectMenuPermsByUserId(Long userId);
}
